On primitive recursive algorithms and the greatest common divisor function
نویسنده
چکیده
We establish linear lower bounds for the complexity of non-trivial, primitive recursive algorithms from piecewise linear given functions. The main corollary is that logtime algorithms for the greatest common divisor from such givens (such as Stein’s) cannot be matched in efficiency by primitive recursive algorithms from the same given functions. The question is left open for the Euclidean algorithm, which assumes the remainder function. In 1991, Colson [3] proved a remarkable theorem about the limitations of primitive recursive algorithms, which has the following consequence: Colson’s Corollary. If a primitive recursive derivation of min(x, y) is expressed faithfully in a programming language, then one of the two computations min(1, 1000) and min(1000, 1) will take at least 1000 steps. The point is that the natural algorithm which computes min(x, y) inO(min(x, y)) steps cannot be matched in efficiency by a primitive recursive program, even though min(x, y) is a primitive recursive function; and so, as a practical and (especially) a foundational matter, we need to consider “recursive schemes” more general than primitive recursion, even if, ultimately, we are only interested in primitive recursive functions. In this paper we consider extensions of Colson’s Theorem which allow conditional definitions and especially calls to a rich variety of “given” functions, whose values are produced on demand in constant time. Sample, easy to state, result: Corollary 20. Consider primitive-recursive-like derivations, which in addition to composition and primitive recursion allow definition by cases and calls to the following functions and (characteristic functions of) relations: x+ y, x− y, x÷ 2, Parity(x), x = y, x < y For each such derivation of the greatest common divisor function gcd(x, y), there is a sequence of pairs {(xt, yt)} and a rational constant r > 0, such that limt(xt + yt) = ∞, and for all t, c ∗(xt, yt) ≥ r(xt + yt), The research reported here was partially supported by Grant #70/4/5633 from the Research Committee of the University of Athens. I am also grateful to the Graduate Program in Logic, Algorithms and Computation (MΠΛA), for some additional financial and much moral support. I thank Elias Koutsoupias who was (really) a collaborator in the early stages of this work (see Footnote 5); René David, for his useful comments on early versions of the paper; and Lou van den Dries for his comments which influenced substantially the final, revised version of the paper, and (more significantly) for his subsequent contributions to the topic, see 8.1. Colson proved a general result about (absolute) call-by-name primitive recursion, which implies this Corollary, and David [4] extended Colson’s result using a new method; the call-by-value version of the theorem was established by Fredholm [6, 7]. Version sent to the printer, posted March 4, 2003 To appear in Theoretical Computer Science 1 2 YIANNIS N. MOSCHOVAKIS where the essential complexity measure c(x, y) is lower than both the strict and non-strict (parallel) complexity measures for primitive recursive algorithms from arbitrary given functions. It follows that Stein’s algorithm which computes gcd(x, y) with strict complexity O(log2(x) + log2(y)), using the givens listed in the theorem and a very simple (but not primitive) recursion scheme, cannot be matched in efficiency using only “primitive-recursive-like” recursive definitions. We will start in Section 1 with some precise definitions of (mostly) familiar notions, and then give in Section 2 a detailed proof of the strict (call-by-value) version of Colson’s Theorem, which sets the pattern for the later results. Section 3 develops some simple ideas from linear programming, which are then used in Section 4 to effect the main construction of the paper for the call-by-value case; this is strengthened by the introduction of conditionals and the essential complexity measure in Section 5, and again in Section 6, where it is shown that the essential complexity is no larger than the non-strict complexity measure. The main result of the paper is established in Section 7. Finally, in Section 8, we discuss briefly the connection of this work with the work of Colson, Fredholm and David which inspired it, and we formulate two relevant open problems.
منابع مشابه
On the Fourier Transform of the Greatest Common Divisor
The discrete Fourier transform of the greatest common divisor � id[a](m) = m � k=1 gcd(k,m)α m , with αm a primitive m-th root of unity, is a multiplicative function that generalizes both the gcd-sum function and Euler’s totient function. On the one hand it is the Dirichlet convolution of the identity with Ramanujan’s sum, � id[a] = id ∗ c•(a), and on the other hand it can be written as a gener...
متن کاملSubresultants in Recursive Polynomial Remainder Sequence
We introduce concepts of “recursive polynomial remainder sequence (PRS)” and “recursive subresultant,” and investigate their properties. In calculating PRS, if there exists the GCD (greatest common divisor) of initial polynomials, we calculate “recursively” with new PRS for the GCD and its derivative, until a constant is derived. We call such a PRS a recursive PRS. We define recursive subresult...
متن کاملMultidimensional Greatest Common Divisor and Lehmer Algorithms
A class of multidimensional greatest common divisor algorithms is studied. Their connection with the Jacobi algorithm is established and used to obtain theoretical properties such as the existence of digit frequencies. A technique of D. H. Lehmer's for Euclid's algorithm is generalized for efficient computation of the multidimensional algorithms. For triples of integers, two algorithms of inter...
متن کاملRecursive Polynomial Remainder Sequence and its Subresultants
We introduce concepts of “recursive polynomial remainder sequence (PRS)” and “recursive subresultant,” along with investigation of their properties. A recursive PRS is defined as, if there exists the GCD (greatest common divisor) of initial polynomials, a sequence of PRSs calculated “recursively” for the GCD and its derivative until a constant is derived, and recursive subresultants are defined...
متن کاملCompactness of arithmetic quotients of anisotropic orthogonal groups
where | ∗ |v is the v from among the normalization of norms so that the product formula holds. A vector x ∈ VA is primitive if it is of the form xog where g ∈ GL(n,A) and xo ∈ VQ. That is, it is an image of a rational point of the vectorspace by an element of the adele group. For x = (x1, . . . , xn) ∈ VQ, at almost all non-archimedean primes v the xi’s are in Zv and have greatest common diviso...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Theor. Comput. Sci.
دوره 1-3 شماره
صفحات -
تاریخ انتشار 2003